import React, { PureComponent, Fragment } from 'react';
import { connect } from 'dva';
import { Row, Col, Spin, Card, Icon, message , Button } from 'antd';
import styles from "./component.less";
import VideoAction from "./VideoAction";
import DistrictTreeCard from "./DistrictTreeCard";
@connect()
export default class VideoInspection extends PureComponent {
  constructor(props) {
    super(props);
    console.log(window.location.host);
    const url = "http://"+window.location.host+"/video.html"+'?new='+Math.random();
    console.log(url);
    this.state = {
      url:url,
      detailId: 0,
      detailInfoId: 0,
    };
  }

  componentWillUnmount(){
    const { dispatch } = this.props;
    dispatch({
      type: `task/appendClearState`,
    })
  }

  render() {
    const { location } = this.props;
    const pagesquery = location.query;

    return (
          // <PageHeaderLayout >
          //   {
          //     location.pathname=="/maintain/video/list" &&
          //     <HistoryListTable
          //       pagesquery={pagesquery}
          //     />
          //   }
          // </PageHeaderLayout>
          <Row gutter={{ md: 8, lg: 24, xl: 48 }} style={{height:'100%',marginTop:-9}}>
            <Col md={17} style={{height:'100%',paddingRight:0,paddingLeft:15}}>
              <iframe ref="videoIframe" id="videoIframe"  src={this.state.url} width="100%" height="100%" frameBorder="no" border="0" marginWidth="0" marginHeight="0" scrolling="no" allowtransparency="yes"></iframe>       
                {/*<MaintenancTrack/>*/}
            </Col>
            <Col md={7} style={{minHeight:'200px', height:'100%',position:'relative',paddingRight:15,paddingLeft:15}}>
              <VideoAction/>
              <DistrictTreeCard/>
            </Col>
  
        </Row>


    );
  }
}